'''
对列表中的内容进行排序
列表.sort()
sorted(列表)
'''
alist=[2,7,2,9,4,34,23,67,89,12]
alist.reverse()  # 反转
print(alist)

alist.sort()# 默认升序
alist.sort(reverse=True)# 降序排列
print(alist)

blist=['tom',"lily","lucy",'jack',"rose","mandy"]
# blist1 = sorted(blist)  # 按字母顺序自然排序
blist1 = sorted(blist,reverse=True)  # 按字母顺序自然排序
print(blist1)